package com.hy.mydesktop.shared.business;

import java.util.ArrayList ;
import java.util.HashMap ;
import java.util.List ;
import java.util.Map ;

import com.extjs.gxt.ui.client.data.BaseModel ;
import com.hy.erp.inventory.pojo.interfaces.ICargoSpace;
import com.hy.mydesktop.client.component.mvc.event.EventStructureMetaModel;
import com.hy.mydesktop.client.component.type.ComponentControllerEnum;
import com.hy.mydesktop.client.component.type.ComponentTypeEnum;
import com.hy.mydesktop.shared.persistence.domain.gxt.GxtComponentMetaModel;
import com.hy.mydesktop.shared.persistence.domain.gxt.GxtComponentMetaNodeModel;
import com.hy.mydesktop.shared.persistence.domain.gxt.ItemOfAssociateToWindow;

/**
 * 
 * <ul>
 * <li>开发作者：李冰</li>
 * <li>设计日期：2010-11-25；时间：下午04:02:06</li>
 * <li>类型名称：CargoSpaceServices</li>
 * <li>设计目的：货架</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */
public class CargoSpaceServices 
{
	
	//创建桌面快捷方式的代码	
	private GxtComponentMetaModel createDynamicDesktopController3() {

		Map<String , Object> desktopController=new HashMap<String, Object>();
//		desktopController.put("component_controller_model_type", ComponentControllerEnum.DESKTOP_CONTROL_MODEL);
		desktopController.put("component_controller_model_type_index", ComponentControllerEnum.DESKTOP_CONTROLLOR_MODEL.ordinal());
		List<String> codes1 = new ArrayList<String>();
		codes1.add("0003");
		codes1.add("0002");
		codes1.add("0005");
		desktopController.put("registereventtypes", codes1);
		desktopController.put("id", "desktopController");
		GxtComponentMetaNodeModel node=new GxtComponentMetaNodeModel(desktopController,1,4);
		
		Map<String , Object> shortcutController=new HashMap<String, Object>();
//		shortcutController.put("component_controller_model_type", ComponentControllerEnum.SHORTCUT_CONTROLLER_MODEL);
		shortcutController.put("component_controller_model_type_index", ComponentControllerEnum.SHORTCUT_CONTROLLER_MODEL.ordinal());
		List<String> codes2 = new ArrayList<String>();
		codes2.add("0003");
		codes2.add("0002");
		codes2.add("0005");
		shortcutController.put("registereventtypes", codes2);
		shortcutController.put("id", "shortcutController01");
		shortcutController.put("viewdata", "shortcut_viewData_init_01");	
		shortcutController.put("gxtcomponentmetanodemodel", this.getShortcutGxtComponentMetaNodeModel());		
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(shortcutController,2,3);
		
		
		List<GxtComponentMetaNodeModel> list=new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node);
		list.add(node2);
		

		GxtComponentMetaModel gxtComponentMetaModel=new GxtComponentMetaModel(list);
		
		
		
		
		return gxtComponentMetaModel;
		

	}
	
	


	private GxtComponentMetaNodeModel getShortcutGxtComponentMetaNodeModel() {
		Map<String, Object> map2=new HashMap<String, Object>();
		//map2.put("component_model_type", ComponentTypeEnum.SHORTCUT_MODEL);
		map2.put("component_model_type_index", ComponentTypeEnum.SHORTCUT_MODEL.ordinal());
		//TODO map2.put("appEventType", AppEvents.DESKTOP_SHORTCUT_ONCLICK_INIT);
			Map<String,Object> RegisterEventTypeDatas = new HashMap<String, Object>();
			//添加需要监听的事件类型，指定由某一个控制器响应，控制器内部应该如何响应（附加参数和数据）
			/**
			 * 00_01_02为特征码
			 * 或者是 控制器的唯一标识
			 */
				Map<String,Object> oneRegisterEventTypeData = new HashMap<String, Object>();
					EventStructureMetaModel eventStructureMetaModel = new EventStructureMetaModel();
					eventStructureMetaModel.setControllerId("shortcutController01");
					eventStructureMetaModel.setRootControllerId("desktopController");
					eventStructureMetaModel.setResponseModeId("00_01_02");
				oneRegisterEventTypeData.put("eventstructuremetamodel", eventStructureMetaModel);
				
					Map<String,Object> oneDispacherEventTypeData = new HashMap<String, Object>();
						EventStructureMetaModel subEventStructureMetaModel = new EventStructureMetaModel();
						subEventStructureMetaModel.setControllerId("1_1_windowController_CargoSpace");
						subEventStructureMetaModel.setRootControllerId("1_1_windowController_CargoSpace");
					oneDispacherEventTypeData.put("eventstructuremetamodel", subEventStructureMetaModel);
					oneDispacherEventTypeData.put("count", 7);
				oneRegisterEventTypeData.put("dispachereventtype", "0007");
				
			RegisterEventTypeDatas.put("0003", oneRegisterEventTypeData);
			//codes1.add("0002");
		map2.put("registereventtypes", RegisterEventTypeDatas);
			Map<String,Object> dispacherEventTypeDatas = new HashMap<String, Object>();
			dispacherEventTypeDatas.put("0007", oneDispacherEventTypeData);
		map2.put("dispachereventtypes", dispacherEventTypeDatas);
		//map2.put("icon", "user");
		//map2.put("icon", "extanim32");
		map2.put("text", "Rpc   -----LoginView----AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER");	
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(map2);
		return node2;
	}

	
	
	public List<GxtComponentMetaModel> validateLogin0 ( BaseModel	baseModel) {
		System.err.println("Rpc get Username + Password" + baseModel.get("username")
				+"  "+baseModel.get("password"));
		List<GxtComponentMetaModel> list=new ArrayList<GxtComponentMetaModel>();
		
		//list.add(gxtComponentMetaModel);
		list.add(this.createDynamicDesktopController3());
		list.add(this.createDynamicWindowController22());
			
	
		return list;
	}

	

	public GxtComponentControllerMetaModel createDynamicWindowController000()
	{
		String controllerMetaModelId="depotServices";		
		Map<String , Object> panelInFormMap2=new HashMap<String, Object>();
		String formId="depotService";
		panelInFormMap2=createPanelInFormMap2(controllerMetaModelId,formId, panelInFormMap2);
		
		GxtComponentControllerMetaModel gxtComponentControllerMetaModel=
			WindowApplicationBuildTemplate.createSimpleWindowApplication_model2(
				controllerMetaModelId,"仓库设置",formId,panelInFormMap2);

		return gxtComponentControllerMetaModel;		

	}
	
	

	private Map<String, Object> createPanelInFormMap2(String controllerMetaModelId, String formId, Map<String, Object> gridMap2) {
		Map<String, Object> map2 = new HashMap<String, Object>();

		
		List<ItemOfAssociateToWindow> childrenItems=new LinkedList<ItemOfAssociateToWindow>();
		//货架名称 
		ItemOfAssociateToWindow depotNameItem   = PanelInFormBuilderTemplate
			.createTextFieldItem(ICargoSpace.NAME, "货架名称", "请输入货架名称");
		childrenItems.add(depotNameItem);

		ItemOfAssociateToWindow personItem   = PanelInFormBuilderTemplate
		.createTextFieldItem(ICargoSpace.SPECIFICADDRESS, "具体地址", "请输入具体地址");
		childrenItems.add(personItem);
		
		ItemOfAssociateToWindow personItem   = PanelInFormBuilderTemplate
		.createTextFieldItem(ICargoSpace.WIDTH, "货架宽度", "请输入货架宽度");
		childrenItems.add(personItem);
		
		ItemOfAssociateToWindow personItem   = PanelInFormBuilderTemplate
		.createTextFieldItem(ICargoSpace.MAXWEIGHT, "货架允许最大重量", "请输入货架允许最大重量");
		childrenItems.add(personItem);
		

		
		ItemOfAssociateToWindow organizationItem   = PanelInFormBuilderTemplate
		.createComboxItem(IDepot.ORGANIZATION, "所属组织");
		
		childrenItems.add(organizationItem);
		type.put("component_model_type_index", ComponentTypeEnum.COMBOBOX_MODEL.ordinal());
		type.put("fieldlabel", "主要负责人");
		type.put ( "id" , "cargoSpace.person" ); 
		//type.put("dataload", "xxx");
		type.put("typeahead", true);
		type.put("emptytext", "===请选择===");
		type.put("loadingtext", "数据加载中,请稍等。。。。。。");
		type.put("allowblank", false);
		type.put("name", "comboBox");
		HandlerData.data ( type , "personService" , "getAllPerson"  );

		ItemOfAssociateToWindow addressItem   = PanelInFormBuilderTemplate
		.createTextFieldItem(IDepot.ADDRESS, "地址", "请输入地址");
		childrenItems.add(addressItem);
		
		
		ItemOfAssociateToWindow effectiveDateItem   = PanelInFormBuilderTemplate
		.createDateFieldItem(IDepot.BECOMEEFFECTIVEDATE,"生效日期", "请选择生效日期");
		childrenItems.add(effectiveDateItem);
		
		ItemOfAssociateToWindow failureDateItem   = PanelInFormBuilderTemplate
		.createDateFieldItem(IDepot.FAILUREDATE,"失效日期", "请选择失效日期");
		childrenItems.add(failureDateItem);
		
		ItemOfAssociateToWindow lossItem   = PanelInFormBuilderTemplate
		.createCheckBoxItem(IDepot.LOSSSTOCK, "是否允许负库存");
		childrenItems.add(lossItem);
		
		ItemOfAssociateToWindow effectiveItem   = PanelInFormBuilderTemplate
		.createCheckBoxItem(IDepot.BECOMEFFECTIVE, "是否生效");
		childrenItems.add(effectiveItem);
		
		

		ItemOfAssociateToWindow descriptionItem   = PanelInFormBuilderTemplate
		.createTextAreaItem(IDepot.DESCRIPTION,"描述", "请填写描述信息");
		childrenItems.add(descriptionItem);
		
		ItemOfAssociateToWindow remarkItem   = PanelInFormBuilderTemplate
		.createTextAreaItem(IDepot.REMARK,"备注", "请填写备注信息");
		childrenItems.add(remarkItem);

    	 //  55555555555555

		//		Map<String, Object> checkBox03 = new HashMap<String, Object>();
//	    checkBox03.put("component_model_type_index", ComponentTypeEnum.CHECKBOX_MODEL.ordinal());
//	    checkBox03.put("boxlabel", "上级库存组织");
//	    checkBox03.put("name", "check2");
//	    checkBox03.put ( "id" , "07_08.depot.SUPERISORDEPOTORGANIZATION" );
//		GxtComponentMetaNodeModel node33  = new GxtComponentMetaNodeModel(checkBox03);
		map2.put(ComponentMetaDataConstants.CHILDREN_ITEMS,  childrenItems) ;
		map2.put(ComponentMetaDataConstants.CHILDREN_ITEMS_TYPE,ComponentMetaDataConstants.TWOCOLUMN_PANELINFORM_CHILDREN_ITEMS_TYPE);
		//node2.setChildrenItems(childrenItems);
		return map2;
	}
	
	
	
	
	
	public GxtComponentMetaModel createDynamicWindowController22() {

		
		
		//窗口控制器
		Map<String , Object> windowController=new HashMap<String, Object>();
//		windowController.put("component_controller_model_type", ComponentControllerEnum.WINDOW_CONTROLLER_MODEL);
		windowController.put("component_controller_model_type_index", ComponentControllerEnum.WINDOW_CONTROLLER_MODEL.ordinal());
		List<String> codes1 = new ArrayList<String>();
		codes1.add("0301");		
		codes1.add("0401");
		codes1.add("0007");
		codes1.add("0008");
		codes1.add("0013");
		
		windowController.put("id", "1_1_windowController_CargoSpace");
		windowController.put("registereventtypes", codes1);
		windowController.put("viewdata", "window_viewData_init_02");		
		windowController.put("gxtcomponentmetanodemodel", this.getWindowGxtComponentMetaNodeModel());		
		GxtComponentMetaNodeModel node=new GxtComponentMetaNodeModel(windowController,1,44);
		
		//内容面板控制器
		Map<String , Object> contentPanelController=new HashMap<String, Object>();
//		contentPanelController.put("component_controller_model_type", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL);
		contentPanelController.put("component_controller_model_type_index", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL.ordinal());
		List<String> codes2 = new ArrayList<String>();
		codes2.add("0301");
		codes2.add("0401");
		codes2.add("0007");
		codes2.add("0008");
		contentPanelController.put("registereventtypes", codes2);				
		contentPanelController.put("id", "2_1_contentPanelController_CargoSpace");				
		contentPanelController.put("viewdata", "contentPanel_viewData_init_01");
		contentPanelController.put("gxtcomponentmetanodemodel", this.getContentPanelGxtComponentMetaNodeModel());		

		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(contentPanelController,2,43);
		
		//菜单栏控制器
		Map<String , Object> menuBarController=new HashMap<String, Object>();
//		menuBarController.put("component_controller_model_type", ComponentControllerEnum.MENUBAR_CONTROLLER_MODEL);
		menuBarController.put("component_controller_model_type_index", ComponentControllerEnum.MENUBAR_CONTROLLER_MODEL.ordinal());
		List<String> codes3 = new ArrayList<String>();
		codes3.add("0301");
		codes3.add("0401");
		codes3.add("0007");
		codes3.add("0008");
		menuBarController.put("registereventtypes", codes3);
		menuBarController.put("id", "3_1_menuBarController_CargoSpace");
		menuBarController.put("viewdata", "menuBar_viewData_init_01");		
	//	menuBarController.put("gxtcomponentmetanodemodel", this.getMenuBarGxtComponentMetaNodeModel2());		
		GxtComponentMetaNodeModel node3=new GxtComponentMetaNodeModel(menuBarController,3,4);
		
		
		//工具栏控制器
		Map<String , Object> toolBarController=new HashMap<String, Object>();
//		toolBarController.put("component_controller_model_type", ComponentControllerEnum.TOOLBAR_CONTROLLER_MODEL);
		toolBarController.put("component_controller_model_type_index", ComponentControllerEnum.TOOLBAR_CONTROLLER_MODEL.ordinal());
		List<String> codes4 = new ArrayList<String>();
	    codes4.add("0301");
		codes4.add("0401");
		codes4.add("0007");
		codes4.add("0008");
		toolBarController.put("registereventtypes", codes4);
		toolBarController.put("id", "3_1_toolBarController_CargoSpace");
		toolBarController.put("viewdata", "toolBar_viewData_init_01");		
		toolBarController.put("gxtcomponentmetanodemodel", this.getToolBarGxtComponentMetaNodeModel2());		
		GxtComponentMetaNodeModel node4=new GxtComponentMetaNodeModel(toolBarController,5,6);
		
		
		
		//提交面板控制器
		Map<String, Object> sumFormPanelController=new HashMap<String, Object>();
//		sumFormPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMPANEL_CONTROLLER_MODEL);
		sumFormPanelController.put("component_controller_model_type_index", ComponentControllerEnum.FORMPANEL_CONTROLLER_MODEL.ordinal());
//		sumFormPanelController.put("component_controller_model_type_index", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL.ordinal());
		List<String> codes45 = new ArrayList<String>();
		codes45.add("0301");
		codes45.add("0401");
		codes45.add("0007");
		codes45.add("0008");
		codes45.add("0304");
		sumFormPanelController.put("registereventtypes", codes45);
		sumFormPanelController.put("id", "3_1_sumFormPanelController_CargoSpace");
		sumFormPanelController.put("controllerdata", "sumFormPanel_controllerdata_init_01");		
		sumFormPanelController.put("viewdata", "sumFormPanel_viewData_init_01");		
		sumFormPanelController.put("gxtcomponentmetanodemodel",  this.getSumFormPanelGxtComponentMetaNodeModel());		
		//sumFormPanelController.put("gxtcomponentmetanodemodel", this.getContentPanelGxtComponentMetaNodeModel());		

		GxtComponentMetaNodeModel node45=new GxtComponentMetaNodeModel(sumFormPanelController, 7, 42);
		
		//表单控制器
		
		Map<String , Object> formPanelController=new HashMap<String, Object>();
//		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
//		formPanelController.put("component_controller_model_type_index", ComponentControllerEnum.FORMPANEL_CONTROLLER_MODEL.ordinal());
		formPanelController.put("component_controller_model_type_index", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL.ordinal());
		List<String> codes5 = new ArrayList<String>();
		codes5.add("0301");
		codes5.add("0401");
		codes5.add("0007");
		codes5.add("0008");
		formPanelController.put("registereventtypes", codes5);
		formPanelController.put("id", "4_1_formPanelController_CargoSpace");
		formPanelController.put("controllerdata", "formPanel_controllerdata_init_01");		
		formPanelController.put("viewdata", "formPanel_viewData_init_01");			
		formPanelController.put("gxtcomponentmetanodemodel",  this.getFormSetContentPanelGxtComponentMetaNodeModel());		
		GxtComponentMetaNodeModel node5=new GxtComponentMetaNodeModel(formPanelController,8,41);
		
		

		//内容面板控制器
		Map<String , Object> contentPanelController1=new HashMap<String, Object>();
//		contentPanelController.put("component_controller_model_type", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL);
		contentPanelController1.put("component_controller_model_type_index", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL.ordinal());
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0301");
		codes6.add("0401");
		codes6.add("0007");
		codes6.add("0008");
		contentPanelController1.put("registereventtypes", codes6);				
		contentPanelController1.put("id", "5_1_contentPanelController_CargoSpace");				
		contentPanelController1.put("viewdata", "contentPanel_viewData_init_01");
		contentPanelController1.put("gxtcomponentmetanodemodel", this.getContentPanelGxtComponentMetaNodeModel1());	
		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(contentPanelController1,9,24);
		

		//内容面板控制器
		Map<String , Object> contentPanelController2=new HashMap<String, Object>();
//		contentPanelController.put("component_controller_model_type", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL);
		contentPanelController2.put("component_controller_model_type_index", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL.ordinal());
		List<String> codes7 = new ArrayList<String>();
		codes7.add("0301");
		codes7.add("0401");
		codes7.add("0007");
		codes7.add("0008");
		contentPanelController2.put("registereventtypes", codes7);				
		contentPanelController2.put("id", "5_2_contentPanelController_CargoSpace");				
		contentPanelController2.put("viewdata", "contentPanel_viewData_init_01");
		contentPanelController2.put("gxtcomponentmetanodemodel", this.getContentPanelGxtComponentMetaNodeModel2());	
		
		GxtComponentMetaNodeModel node7=new GxtComponentMetaNodeModel(contentPanelController2,25,40);
		
		
		
		
		
		
		
		//货架名称 文本框控制器
		Map<String , Object> textFieldController_5_1=new HashMap<String, Object>();
//		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		textFieldController_5_1.put("component_controller_model_type_index", ComponentControllerEnum.TEXTFIELD_CONTROLLER_MODEL.ordinal());
		List<String> codes5_2_3 = new ArrayList<String>();
		codes5_2_3.add("0301");
		codes5_2_3.add("0401");
		codes5_2_3.add("0007");
		codes5_2_3.add("0008");
		codes5_2_3.add("0305");
		textFieldController_5_1.put("registereventtypes", codes5_2_3);
		textFieldController_5_1.put("id", "5_1_NameTextFieldController_CargoSpace");
		textFieldController_5_1.put("controllerdata", "textFieldController_5_2_3_controllerdata_init_01");		
		textFieldController_5_1.put("viewdata", "textFieldController_5_2_3_viewData_init_01");		
		textFieldController_5_1.put("gxtcomponentmetanodemodel",  this.getNameTextFieldGxtComponentMetaNodeModel());		
		GxtComponentMetaNodeModel node5_2_3=new GxtComponentMetaNodeModel(textFieldController_5_1,10,11);


		//具体地址 文本框控制器
		Map<String , Object> addressTextFieldController=new HashMap<String, Object>();
//		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		addressTextFieldController.put("component_controller_model_type_index", ComponentControllerEnum.TEXTFIELD_CONTROLLER_MODEL.ordinal());
		List<String>codes5_2_5 = new ArrayList<String>();
		codes5_2_5.add("0301");
		codes5_2_5.add("0401");
		codes5_2_5.add("0007");
		codes5_2_5.add("0008");
		codes5_2_5.add("0305");
		addressTextFieldController.put("registereventtypes", codes5_2_5);
		addressTextFieldController.put("id", "5_3_addressTextFieldController_CargoSpace");
		addressTextFieldController.put("controllerdata", "textFieldController_5_2_3_controllerdata_init_01");		
		addressTextFieldController.put("viewdata", "textFieldController_5_2_3_viewData_init_01");		
		addressTextFieldController.put("gxtcomponentmetanodemodel",  this.getAddressTextFieldGxtComponentMetaNodeModel());		
	GxtComponentMetaNodeModel node5_2_5=new GxtComponentMetaNodeModel(addressTextFieldController,12,13);

		
	

	//宽度 文本框控制器
	Map<String , Object> widthTextFieldController=new HashMap<String, Object>();
	//formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
	widthTextFieldController.put("component_controller_model_type_index", ComponentControllerEnum.TEXTFIELD_CONTROLLER_MODEL.ordinal());
	List<String>codes5_2_6 = new ArrayList<String>();
	codes5_2_6.add("0301");
	codes5_2_6.add("0401");
	codes5_2_6.add("0007");
	codes5_2_6.add("0008");
	codes5_2_6.add("0305");
	widthTextFieldController.put("registereventtypes", codes5_2_6);
	widthTextFieldController.put("id", "5_4_widthTextFieldController_CargoSpace");
	widthTextFieldController.put("controllerdata", "textFieldController_5_2_3_controllerdata_init_01");		
	widthTextFieldController.put("viewdata", "textFieldController_5_2_3_viewData_init_01");		
	widthTextFieldController.put("gxtcomponentmetanodemodel",  this.getWidthTextFieldGxtComponentMetaNodeModel());		
	GxtComponentMetaNodeModel node5_2_6=new GxtComponentMetaNodeModel(widthTextFieldController,14,15);
	
	
	


	//重量 文本框控制器
	Map<String , Object> weightTextFieldController=new HashMap<String, Object>();
	//formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
	weightTextFieldController.put("component_controller_model_type_index", ComponentControllerEnum.TEXTFIELD_CONTROLLER_MODEL.ordinal());
	List<String>codes5_2_7 = new ArrayList<String>();
	codes5_2_7.add("0301");
	codes5_2_7.add("0401");
	codes5_2_7.add("0007");
	codes5_2_7.add("0008");
	codes5_2_7.add("0305");
	weightTextFieldController.put("registereventtypes", codes5_2_7);
	weightTextFieldController.put("id", "5_5_weightTextFieldController_CargoSpace");
	weightTextFieldController.put("controllerdata", "textFieldController_5_2_3_controllerdata_init_01");		
	weightTextFieldController.put("viewdata", "textFieldController_5_2_3_viewData_init_01");		
	weightTextFieldController.put("gxtcomponentmetanodemodel",  this.getWeightTextFieldGxtComponentMetaNodeModel());		
	GxtComponentMetaNodeModel node5_2_7=new GxtComponentMetaNodeModel(weightTextFieldController,16,17);


	44444444444444444

//负责人下拉框控制器 
Map<String , Object> personComboBoxController=new HashMap<String, Object>();
//formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
personComboBoxController.put("component_controller_model_type_index", ComponentControllerEnum.COMBOBOX_CONTROLLER_MODEL.ordinal());
List<String> codes5_2_4 = new ArrayList<String>();
codes5_2_4.add("0301");
codes5_2_4.add("0401");
codes5_2_4.add("0007");
codes5_2_4.add("0008");
codes5_2_4.add("0305");
personComboBoxController.put("registereventtypes", codes5_2_4);
personComboBoxController.put("id", "5_2_personComboBoxController_CargoSpace");
personComboBoxController.put("controllerdata", "comboBoxController_5_1_2_controllerdata_init_01");		
personComboBoxController.put("viewdata", "comboBoxController_5_1_2_viewData_init_01");		
personComboBoxController.put("gxtcomponentmetanodemodel",  this.getPersonGxtComponentMetaNodeModel());		
GxtComponentMetaNodeModel node5_2_4=new GxtComponentMetaNodeModel(personComboBoxController,18,19);






//生效日期控制器
		Map<String , Object> effectiveDatedateFieldController=new HashMap<String, Object>();
//		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		effectiveDatedateFieldController.put("component_controller_model_type_index", ComponentControllerEnum.DATEFIELD_CONTROLLER_MODEL.ordinal());
		List<String> codes5_2_2 = new ArrayList<String>();
		codes5_2_2.add("0301");
		codes5_2_2.add("0401");
		codes5_2_2.add("0007");
		codes5_2_2.add("0008");
		codes5_2_2.add("0305");
		effectiveDatedateFieldController.put("registereventtypes", codes5_2_2);
		effectiveDatedateFieldController.put("id", "5_1_effectiveDatedateFieldController_CargoSpace");
		effectiveDatedateFieldController.put("controllerdata", "dateFieldController_5_2_2_controllerdata_init_01");		
		effectiveDatedateFieldController.put("viewdata", "dateFieldController_5_2_2_viewData_init_01");		
		effectiveDatedateFieldController.put("gxtcomponentmetanodemodel",  this.getDateFieldGxtComponentMetaNodeModel1());		
		GxtComponentMetaNodeModel node5_2_2=new GxtComponentMetaNodeModel(effectiveDatedateFieldController,20,21);
		
		
		//描述 文本区域控制器
		Map<String , Object> textAreaController_5_1_1=new HashMap<String, Object>();
//		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		textAreaController_5_1_1.put("component_controller_model_type_index", ComponentControllerEnum.TEXTAREA_CONTROLLER_MODEL.ordinal());
		List<String> codes5_1_1 = new ArrayList<String>();
		codes5_1_1.add("0301");
		codes5_1_1.add("0401");
		codes5_1_1.add("0007");
		codes5_1_1.add("0008");
		codes5_1_1.add("0305");
		textAreaController_5_1_1.put("registereventtypes", codes5_1_1);
		textAreaController_5_1_1.put("id", "5_1_textAreaController_CargoSpace");
		textAreaController_5_1_1.put("controllerdata", "textAreaController_5_1_1_controllerdata_init_01");		
		textAreaController_5_1_1.put("viewdata", "textFieldController_5_1_1_viewData_init_01");		
		textAreaController_5_1_1.put("gxtcomponentmetanodemodel",  this.getTextAreaGxtComponentMetaNodeModel());
		GxtComponentMetaNodeModel node5_1_1=new GxtComponentMetaNodeModel(textAreaController_5_1_1,22,23);
		
		
	
		//仓库下拉框控制器 
		Map<String , Object> depotComboBoxController=new HashMap<String, Object>();
//		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		depotComboBoxController.put("component_controller_model_type_index", ComponentControllerEnum.COMBOBOX_CONTROLLER_MODEL.ordinal());
		List<String> codes5_1_2 = new ArrayList<String>();
		codes5_1_2.add("0301");
		codes5_1_2.add("0401");
		codes5_1_2.add("0007");
		codes5_1_2.add("0008");
		codes5_1_2.add("0305");
		depotComboBoxController.put("registereventtypes", codes5_1_2);
		depotComboBoxController.put("id", "5_1_depotComboBoxController_CargoSpace");
		depotComboBoxController.put("controllerdata", "comboBoxController_5_1_2_controllerdata_init_01");		
		depotComboBoxController.put("viewdata", "comboBoxController_5_1_2_viewData_init_01");		
		depotComboBoxController.put("gxtcomponentmetanodemodel",  this.getDepotComboBoxGxtComponentMetaNodeModel());		
		GxtComponentMetaNodeModel node5_1_2=new GxtComponentMetaNodeModel(depotComboBoxController,26,27);
		
		
		
	//货架类型下拉框控制器 
	Map<String , Object> cargoSpaceTypeComboBoxController=new HashMap<String, Object>();
//	formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
	cargoSpaceTypeComboBoxController.put("component_controller_model_type_index", ComponentControllerEnum.COMBOBOX_CONTROLLER_MODEL.ordinal());
	List<String> codes5_1_3 = new ArrayList<String>();
	codes5_1_3.add("0301");
	codes5_1_3.add("0401");
	codes5_1_3.add("0007");
	codes5_1_3.add("0008");
	codes5_1_3.add("0305");
	cargoSpaceTypeComboBoxController.put("registereventtypes", codes5_1_3);
	cargoSpaceTypeComboBoxController.put("id", "5_2_cargoSpaceTypeComboBoxController_CargoSpace");
	cargoSpaceTypeComboBoxController.put("controllerdata", "comboBoxController_5_1_2_controllerdata_init_01");		
	cargoSpaceTypeComboBoxController.put("viewdata", "comboBoxController_5_1_2_viewData_init_01");		
	cargoSpaceTypeComboBoxController.put("gxtcomponentmetanodemodel",  this.getCargoSpaceTypeComboBoxGxtComponentMetaNodeModel());		
	GxtComponentMetaNodeModel node5_1_3=new GxtComponentMetaNodeModel(cargoSpaceTypeComboBoxController,28,29);
	



//宽度单位下拉框控制器 
Map<String , Object> widthUnitComboBoxController=new HashMap<String, Object>();
//formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
widthUnitComboBoxController.put("component_controller_model_type_index", ComponentControllerEnum.COMBOBOX_CONTROLLER_MODEL.ordinal());
List<String> codes5_1_4 = new ArrayList<String>();
codes5_1_4.add("0301");
codes5_1_4.add("0401");
codes5_1_4.add("0007");
codes5_1_4.add("0008");
codes5_1_4.add("0305");
widthUnitComboBoxController.put("registereventtypes", codes5_1_4);
widthUnitComboBoxController.put("id", "5_3_widthUnitComboBoxController_CargoSpace");
widthUnitComboBoxController.put("controllerdata", "comboBoxController_5_1_2_controllerdata_init_01");		
widthUnitComboBoxController.put("viewdata", "comboBoxController_5_1_2_viewData_init_01");		
widthUnitComboBoxController.put("gxtcomponentmetanodemodel",  this.getWidthUnitComboBoxGxtComponentMetaNodeModel());		
GxtComponentMetaNodeModel node5_1_4=new GxtComponentMetaNodeModel(widthUnitComboBoxController,30,31);







//重量单位下拉框控制器 
Map<String , Object> weightUnitComboBoxController=new HashMap<String, Object>();
//formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
weightUnitComboBoxController.put("component_controller_model_type_index", ComponentControllerEnum.COMBOBOX_CONTROLLER_MODEL.ordinal());
List<String> codes5_1_5 = new ArrayList<String>();
codes5_1_5.add("0301");
codes5_1_5.add("0401");
codes5_1_5.add("0007");
codes5_1_5.add("0008");
codes5_1_5.add("0305");
weightUnitComboBoxController.put("registereventtypes", codes5_1_5);
weightUnitComboBoxController.put("id", "5_4_weightUnitComboBoxController_CargoSpace");
weightUnitComboBoxController.put("controllerdata", "comboBoxController_5_1_2_controllerdata_init_01");		
weightUnitComboBoxController.put("viewdata", "comboBoxController_5_1_2_viewData_init_01");		
weightUnitComboBoxController.put("gxtcomponentmetanodemodel",  this.getWeightUnitComboBoxGxtComponentMetaNodeModel());		
GxtComponentMetaNodeModel node5_1_5=new GxtComponentMetaNodeModel(weightUnitComboBoxController,32,33);




//是否有效副选框
Map<String , Object> checkBoxGroupController_5_2_1=new HashMap<String, Object>();
//formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
checkBoxGroupController_5_2_1.put("component_controller_model_type_index", ComponentControllerEnum.CHECKGROUP_CONTROLLER_MODEL.ordinal());
List<String> codes5_2_1 = new ArrayList<String>();
codes5_2_1.add("0301");
codes5_2_1.add("0401");
codes5_2_1.add("0007");
codes5_2_1.add("0008");
codes5_2_1.add("0305");
checkBoxGroupController_5_2_1.put("registereventtypes", codes5_2_1);
checkBoxGroupController_5_2_1.put("id", "5_1_checkBoxGroupController_CargoSpace");
checkBoxGroupController_5_2_1.put("controllerdata", "checkBoxGroupController_5_2_1_controllerdata_init_01");		
checkBoxGroupController_5_2_1.put("viewdata", "tcheckBoxGroupController_5_2_1_viewData_init_01");		
checkBoxGroupController_5_2_1.put("gxtcomponentmetanodemodel",  this.getCheckBoxGxtComponentMetaNodeModel());		
GxtComponentMetaNodeModel node5_2_1=new GxtComponentMetaNodeModel(checkBoxGroupController_5_2_1,34,35);





		//失效日期控制器
		Map<String , Object> invalidationDatedateFieldController=new HashMap<String, Object>();
//		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		invalidationDatedateFieldController.put("component_controller_model_type_index", ComponentControllerEnum.DATEFIELD_CONTROLLER_MODEL.ordinal());
		List<String> codes5_2_8= new ArrayList<String>();
		codes5_2_8.add("0301");
		codes5_2_8.add("0401");
		codes5_2_8.add("0007");
		codes5_2_8.add("0008");
		codes5_2_8.add("0305");
		invalidationDatedateFieldController.put("registereventtypes", codes5_2_8);
		invalidationDatedateFieldController.put("id", "5_2_invalidationDatedateFieldController_CargoSpace");
		invalidationDatedateFieldController.put("controllerdata", "dateFieldController_5_2_2_controllerdata_init_01");		
		invalidationDatedateFieldController.put("viewdata", "dateFieldController_5_2_2_viewData_init_01");		
		invalidationDatedateFieldController.put("gxtcomponentmetanodemodel",  this.getDateFieldGxtComponentMetaNodeModel2());		
		GxtComponentMetaNodeModel node5_2_8=new GxtComponentMetaNodeModel(invalidationDatedateFieldController,36,37);



		//备注文本区域控制器
		Map<String , Object> textAreaController_5_1_2=new HashMap<String, Object>();
//		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		textAreaController_5_1_2.put("component_controller_model_type_index", ComponentControllerEnum.TEXTAREA_CONTROLLER_MODEL.ordinal());
		List<String> codes6_1_2 = new ArrayList<String>();
		codes6_1_2.add("0301");
		codes6_1_2.add("0401");
		codes6_1_2.add("0007");
		codes6_1_2.add("0008");
		codes6_1_2.add("0305");
		textAreaController_5_1_2.put("registereventtypes", codes6_1_2);
		textAreaController_5_1_2.put("id", "5_1_textAreaController_CargoSpace");
		textAreaController_5_1_2.put("controllerdata", "textAreaController_5_1_1_controllerdata_init_01");		
		textAreaController_5_1_2.put("viewdata", "textFieldController_5_1_1_viewData_init_01");		
		textAreaController_5_1_2.put("gxtcomponentmetanodemodel",  this.getTextAreaGxtComponentMetaNodeModel2());
		GxtComponentMetaNodeModel node6_1_2=new GxtComponentMetaNodeModel(textAreaController_5_1_2,38,39);
		
		

		List<GxtComponentMetaNodeModel> list=new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node);
		list.add(node2);
		list.add(node3);
		list.add(node4);
		list.add(node45);
		list.add(node5);
		list.add(node6);
		list.add(node7);
		list.add(node5_2_3);
		list.add(node5_2_5);
		list.add(node5_2_6);
		list.add(node5_2_7);
		
		list.add(node5_2_4);
		list.add(node5_2_2);
		list.add(node5_1_1);
		list.add(node5_1_3);
		list.add(node5_1_2);
		list.add(node5_1_4);
		list.add(node5_1_5);
		list.add(node5_2_1);
		list.add(node5_2_8);
		list.add(node6_1_2);
		
		
		
		
		
		
		
		
		
		GxtComponentMetaModel gxtComponentMetaModel=new GxtComponentMetaModel(list);
		return gxtComponentMetaModel;
		
		
		
		

		
		

	}
	
	

	/**
	 * 模拟从后台传过来的关于Window控件的元模型信息
	 */
	private GxtComponentMetaNodeModel getTextAreaGxtComponentMetaNodeModel() {
		//编号
		Map<String, Object> id = new HashMap<String, Object>();
		id.put("component_model_type_index", ComponentTypeEnum.TEXTAREA_MODEL.ordinal());
		HandlerData.data ( id , "cargoSpaceService" , "getAllCargoSpace" , "addCargoSpace" , "modifyCargoSpace" , "loadEditorableGrid" );
			
		id.put("id", "cargoSpace.DESCRIPTION");
		id.put("width", "400");
		id.put("height", 50);
		id.put("title", "bbbbbbbbbbbbbbb");
		id.put("fieldlabel", "描述信息");
		id.put("label", "编号Area_label");
		id.put("name", "textArea01");
		id.put("emptytext", "");
		id.put("allowblank", false);
			Map<String,Object> codes2 = new HashMap<String, Object>();
			//添加需要监听的事件类型，指定由某一个控制器响应，控制器内部应该如何响应（附加参数和数据）
			/**
			 * 00_01_02为特征码
			 * 或者是 控制器的唯一标识
			 */
				Map<String,Object> subMap = new HashMap<String, Object>();
					EventStructureMetaModel eventStructureMetaModel = new EventStructureMetaModel();
					eventStructureMetaModel.setControllerId("textFieldController01");
					eventStructureMetaModel.setResponseModeId("00_01_02");
				subMap.put("eventstructuremetamodel", eventStructureMetaModel);
			codes2.put("0301", subMap);
		
		GxtComponentMetaNodeModel node10  = new GxtComponentMetaNodeModel(id,10,11);
		return node10;
		
	}

	
	
	/**
	 * 模拟从后台传过来的关于Window控件的元模型信息
	 */
	private GxtComponentMetaNodeModel getTextAreaGxtComponentMetaNodeModel2() {
		//编号
		Map<String, Object> id = new HashMap<String, Object>();
		id.put("component_model_type_index", ComponentTypeEnum.TEXTAREA_MODEL.ordinal());
		
		HandlerData.data ( id , "cargoSpaceService" , "getAllCargoSpace" , "addCargoSpace" , "modifyCargoSpace" , "loadEditorableGrid" );
		
		id.put("id", "cargoSpace.COMENT");
		id.put("width", "400");
		id.put("height", 50);
		id.put("title", "bbbbbbbbbbbbbbb");
		id.put("fieldlabel", "备注信息");
		id.put("label", "编号Area_label");
		id.put("name", "textArea01");
		id.put("emptytext", "");
		id.put("allowblank", false);
			Map<String,Object> codes2 = new HashMap<String, Object>();
			//添加需要监听的事件类型，指定由某一个控制器响应，控制器内部应该如何响应（附加参数和数据）
			/**
			 * 00_01_02为特征码
			 * 或者是 控制器的唯一标识
			 */
				Map<String,Object> subMap = new HashMap<String, Object>();
					EventStructureMetaModel eventStructureMetaModel = new EventStructureMetaModel();
					eventStructureMetaModel.setControllerId("textFieldController01");
					eventStructureMetaModel.setResponseModeId("00_01_02");
				subMap.put("eventstructuremetamodel", eventStructureMetaModel);
			codes2.put("0301", subMap);
		
		GxtComponentMetaNodeModel node10  = new GxtComponentMetaNodeModel(id,10,11);
		return node10;
		
	}

	
	/**
	 * 模拟从后台传过来的关于Window控件的元模型信息
	 */
	private GxtComponentMetaNodeModel getWindowGxtComponentMetaNodeModel( ) {
		Map<String, Object> map2=new HashMap<String, Object>();
//		map2.put("component_model_type", ComponentTypeEnum.WINDOW_MODEL);
		map2.put("component_model_type_index", ComponentTypeEnum.WINDOW_MODEL.ordinal());
		map2.put("title", "货架设置");
		map2.put("width", 800);
		map2.put("hight", 550);
		map2.put("id", "01_01_windowGxtComponent_CargoSpace");
		map2.put("resizable", false);
		map2.put("maxmizable", false);
		map2.put("minmizable", true);
		map2.put("layout", ComponentTypeEnum.FITLAYOUT_MODEL.ordinal());
		GxtComponentMetaModel gxtComponentMetaModel = new GxtComponentMetaModel();
		GxtComponentMetaNodeModel gxtComponentMetaNodeModel=new GxtComponentMetaNodeModel(map2);
		                   
		return gxtComponentMetaNodeModel;
		
	}
	
	private GxtComponentMetaNodeModel getContentPanelGxtComponentMetaNodeModel() {
		Map<String, Object> map2=new HashMap<String, Object>();
		//map2.put("component_model_type", ComponentTypeEnum.CONTENTPANEL_MODEL);
		map2.put("component_model_type_index", ComponentTypeEnum.CONTENTPANEL_MODEL.ordinal());
		map2.put("headervisible", false);	
		map2.put("id", "02_01_contentPanelGxtComponent_CargoSpace");	
		map2.put("title", "Rpc===dataload----AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER");	
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(map2);
		return node2;
	}
	
	


	private GxtComponentMetaNodeModel getToolBarGxtComponentMetaNodeModel2() {
		
		
		 	Map<String, Object> button01 = new HashMap<String, Object>();
		    button01.put("component_model_type_index", ComponentTypeEnum.BUTTON_MODEL.ordinal());   
		    button01.put("text", "新建");
			  //TODO map2.put("appEventType", AppEvents.DESKTOP_SHORTCUT_ONCLICK_INIT);
				Map<String,Object> codes2 = new HashMap<String, Object>();
				//添加需要监听的事件类型，指定由某一个控制器响应，控制器内部应该如何响应（附加参数和数据）
				/**
				 * 00_01_02为特征码
				 * 或者是 控制器的唯一标识
				 */
					Map<String,Object> oneRegisterEventTypeData = new HashMap<String, Object>();
						EventStructureMetaModel eventStructureMetaModel = new EventStructureMetaModel();
						eventStructureMetaModel.setControllerId("windowController2");
						eventStructureMetaModel.setRootControllerId("windowController2");
					oneRegisterEventTypeData.put("eventstructuremetamodel", eventStructureMetaModel);
					
		
				codes2.put("0010", oneRegisterEventTypeData);
			button01.put("registereventtypes", codes2);
				BaseModel gxtToSeamServiceParameter = new BaseModel();
				gxtToSeamServiceParameter.set("serviceComponentName", "com.test.server.business.PersonService");
				gxtToSeamServiceParameter.set("serviceMethodName", "loadSubApplication");
				BaseModel[] methodArguments2 = new BaseModel[1];
				methodArguments2[0] = new BaseModel();
				gxtToSeamServiceParameter.set("methodArguments",methodArguments2 );
			button01.put("gxttoseamserviceparametermodel", gxtToSeamServiceParameter);
			GxtComponentMetaNodeModel node11  = new GxtComponentMetaNodeModel(button01);
			
			Map<String, Object> button02 = new HashMap<String, Object>();
		    button02.put("component_model_type_index", ComponentTypeEnum.BUTTON_MODEL.ordinal());   
		    button02.put("text", "保存");
			GxtComponentMetaNodeModel node22  = new GxtComponentMetaNodeModel(button02);
			
			Map<String, Object> button03 = new HashMap<String, Object>();
		    button03.put("component_model_type_index", ComponentTypeEnum.BUTTON_MODEL.ordinal());   
		    button03.put("text", "清空");
			GxtComponentMetaNodeModel node33  = new GxtComponentMetaNodeModel(button03);
			
			Map<String, Object> button04 = new HashMap<String, Object>();
		    button04.put("component_model_type_index", ComponentTypeEnum.BUTTON_MODEL.ordinal());   
		    button04.put("text", "导入");
			GxtComponentMetaNodeModel node44  = new GxtComponentMetaNodeModel(button04);
			
			Map<String, Object> button05 = new HashMap<String, Object>();
		    button05.put("component_model_type_index", ComponentTypeEnum.BUTTON_MODEL.ordinal());   
		    button05.put("text", "导出");
			GxtComponentMetaNodeModel node55  = new GxtComponentMetaNodeModel(button05);
		    
		   

			List<GxtComponentMetaNodeModel> list = new ArrayList<GxtComponentMetaNodeModel>();
			list.add(node11);
			list.add(node22);
			list.add(node33);
			//list.add(node44);
			//list.add(node55);
			
			Map<String, Object> toolbar=new HashMap<String, Object>();
			toolbar.put("component_model_type_index", ComponentTypeEnum.TOOLBAR_MODEL.ordinal());
			toolbar.put("id", "03_01_toolbarGxtComponent_CargoSpace");	
			//toolbar.put("add", btn);
			toolbar.put("children", list);

			ToolBarHandler.configureToolBarGxtComponentMetaNodeModel ( toolbar );

		
			GxtComponentMetaNodeModel node4=new GxtComponentMetaNodeModel(toolbar, 5, 6);
			
			

			return node4;
	}
	private GxtComponentMetaNodeModel getSumFormPanelGxtComponentMetaNodeModel() {
		//创建提交和取消按钮
		Map<String, Object> btnSubmit=new HashMap<String, Object>();
//		btnSubmit.put("component_model_type", ComponentTypeEnum.BUTTON_MODEL);
		//实际创建时，不检查此属性
		btnSubmit.put("component_model_type_index", ComponentTypeEnum.BUTTON_MODEL.ordinal());
		btnSubmit.put("text", "sumFormPanel确定000000");
		btnSubmit.put("id", "03_01_sumFormPanelGxtComponent_CargoSpace");
		Map<String,Object> codes2 = new HashMap<String, Object>();
		//添加需要监听的事件类型，指定由某一个控制器响应，控制器内部应该如何响应（附加参数和数据）
		/**
		 * 00_01_02为特征码
		 * 或者是 控制器的唯一标识
		 */
				Map<String,Object> oneRegisterEventTypeData = new HashMap<String, Object>();
					EventStructureMetaModel eventStructureMetaModel = new EventStructureMetaModel();
					//eventStructureMetaModel.setControllerId("shortcutController02");
					eventStructureMetaModel.setRootControllerId("windowController2");
					//eventStructureMetaModel.setResponseModeId("00_02_02");
				oneRegisterEventTypeData.put("eventstructuremetamodel", eventStructureMetaModel);
				oneRegisterEventTypeData.put("dispachereventtype", "0007");
		
			codes2.put("0302", oneRegisterEventTypeData);
		btnSubmit.put("registereventtypes", codes2);
		GxtComponentMetaNodeModel btnSubmit1=new GxtComponentMetaNodeModel(btnSubmit);
		
		Map<String, Object> btnquxiao=new HashMap<String, Object>();
//		btnquxiao.put("component_model_type", ComponentTypeEnum.BUTTON_MODEL);
		//实际创建时，不检查此属性
		btnquxiao.put("component_model_type_index", ComponentTypeEnum.BUTTON_MODEL.ordinal());
		btnquxiao.put("text", "取消");
		GxtComponentMetaNodeModel btn1=new GxtComponentMetaNodeModel(btnquxiao);
		
		List<GxtComponentMetaNodeModel> list1=new ArrayList<GxtComponentMetaNodeModel>();
		list1.add(btnSubmit1);
		list1.add(btn1);
		
		
		
		Map<String, Object> MaxPanel=new HashMap<String, Object>();
//		MaxPanel.put("component_model_type", ComponentTypeEnum.FORMPANEL_MODEL);
		MaxPanel.put("component_model_type_index", ComponentTypeEnum.FORMPANEL_MODEL.ordinal());
		MaxPanel.put("autowidth", true);
		MaxPanel.put("autoheight", true);
		MaxPanel.put("frame", true);
		
		
		MaxPanel.put("headervisible", false);
		//TODO MaxPanel.put("addbutton", list1);
		MaxPanel.put("addsubmitbutton", true);
		MaxPanel.put("addresetbutton", true);
		MaxPanel.put("buttonalign", "CENTER");
		MaxPanel.put("id", "cargoSpace");
		MaxPanel.put("layoutindex", ComponentTypeEnum.FORMLAYOUT_MODEL.ordinal());
		FormPanelHandler.configureFormPanel ( MaxPanel ,"com.test.server.business.PersonService","listPersonxx");
		//FormPanelHandler.configureFormPanel ( MaxPanel ,"cargoSpaceService","getCargoSpaceById");
		FormPanelHandler.configureFormPanel ( MaxPanel );
		GxtComponentMetaNodeModel node5=new GxtComponentMetaNodeModel(MaxPanel);
		
		return node5;
	}
	


	private GxtComponentMetaNodeModel getFormSetContentPanelGxtComponentMetaNodeModel(){
		Map<String, Object> map2=new HashMap<String, Object>();
		//map2.put("component_model_type", ComponentTypeEnum.CONTENTPANEL_MODEL);
		map2.put("component_model_type_index", ComponentTypeEnum.CONTENTPANEL_MODEL.ordinal());
		map2.put("headervisible", false);	
		map2.put("id", "04_01_formSetContentPanelGxtComponent_CargoSpace");	
		map2.put("layoutindex", ComponentTypeEnum.COLUMNLAYOUT_MODEL.ordinal());
		map2.put("layoutdatainparentcontainer", "100%");
		
		//map2.put("title", "Rpc===dataload----AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER");	
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(map2);
		return node2;
	}
	
	
	
	private GxtComponentMetaNodeModel getNameTextFieldGxtComponentMetaNodeModel() {
		//货架名称 
		Map<String, Object> TextFieldGxtComponent = new HashMap<String, Object>();
		TextFieldGxtComponent.put("component_model_type_index", ComponentTypeEnum.TEXTFIELD_MODEL.ordinal());
	
		
			
				TextFieldGxtComponent.put ( "id" , "cargoSpace.NAME" ); 
				TextFieldGxtComponent.put("width", "400");
				TextFieldGxtComponent.put("title", "bbbbbbbbbbbbbbb");
				TextFieldGxtComponent.put("fieldlabel", "名称");
				TextFieldGxtComponent.put("name", "textField01");
				TextFieldGxtComponent.put("emptytext", "");
				TextFieldGxtComponent.put("allowblank", false);
				HandlerData.data ( TextFieldGxtComponent , "cargoSpaceService" , "getAllCargoSpace" , "addCargoSpace" , "modifyCargoSpace" , "loadEditorableGrid" );
				
			Map<String,Object> codes2 = new HashMap<String, Object>();
			//添加需要监听的事件类型，指定由某一个控制器响应，控制器内部应该如何响应（附加参数和数据）
			/**
			 * 00_01_02为特征码
			 * 或者是 控制器的唯一标识
			 */
				Map<String,Object> subMap = new HashMap<String, Object>();
					EventStructureMetaModel eventStructureMetaModel = new EventStructureMetaModel();
					eventStructureMetaModel.setControllerId("textFieldController01");
					eventStructureMetaModel.setResponseModeId("00_01_02");
				subMap.put("eventstructuremetamodel", eventStructureMetaModel);
			codes2.put("0301", subMap);
			//codes1.add("0002");
		//id.put("registereventtypes", codes2);
		GxtComponentMetaNodeModel node10  = new GxtComponentMetaNodeModel(TextFieldGxtComponent,10,11);
		return node10;
	}
	
	
	
	private GxtComponentMetaNodeModel getPersonGxtComponentMetaNodeModel() {
	
		

		//人员
		Map<String, Object> type = new HashMap<String, Object>();
		type.put("component_model_type_index", ComponentTypeEnum.COMBOBOX_MODEL.ordinal());
		type.put("fieldlabel", "主要负责人");
		type.put ( "id" , "cargoSpace.person" ); 
		//type.put("dataload", "xxx");
		type.put("typeahead", true);
		type.put("emptytext", "===请选择===");
		type.put("loadingtext", "数据加载中,请稍等。。。。。。");
		type.put("allowblank", false);
		type.put("name", "comboBox");
		HandlerData.data ( type , "personService" , "getAllPerson"  );
		
		GxtComponentMetaNodeModel node10  = new GxtComponentMetaNodeModel(type,12,13);
		return node10;
	}
	
	
	
	private GxtComponentMetaNodeModel getAddressTextFieldGxtComponentMetaNodeModel() {
		//名称 
		Map<String, Object> TextFieldGxtComponent = new HashMap<String, Object>();
		TextFieldGxtComponent.put("component_model_type_index", ComponentTypeEnum.TEXTFIELD_MODEL.ordinal());
	
	
				TextFieldGxtComponent.put ( "id" , "cargoSpace.SPECIFICADDRESS" ); 
				TextFieldGxtComponent.put("width", "400");
				TextFieldGxtComponent.put("title", "bbbbbbbbbbbbbbb");
				TextFieldGxtComponent.put("fieldlabel", "具体地址");
				TextFieldGxtComponent.put("name", "textField01");
				TextFieldGxtComponent.put("emptytext", "");
				TextFieldGxtComponent.put("allowblank", false);
				HandlerData.data ( TextFieldGxtComponent , "cargoSpaceService" , "getAllCargoSpace" , "addCargoSpace" , "modifyCargoSpace" , "loadEditorableGrid" );
				
			Map<String,Object> codes2 = new HashMap<String, Object>();
			//添加需要监听的事件类型，指定由某一个控制器响应，控制器内部应该如何响应（附加参数和数据）
			/**
			 * 00_01_02为特征码
			 * 或者是 控制器的唯一标识
			 */
				Map<String,Object> subMap = new HashMap<String, Object>();
					EventStructureMetaModel eventStructureMetaModel = new EventStructureMetaModel();
					eventStructureMetaModel.setControllerId("textFieldController01");
					eventStructureMetaModel.setResponseModeId("00_01_02");
				subMap.put("eventstructuremetamodel", eventStructureMetaModel);
			codes2.put("0301", subMap);
			//codes1.add("0002");
		//id.put("registereventtypes", codes2);
		GxtComponentMetaNodeModel node10  = new GxtComponentMetaNodeModel(TextFieldGxtComponent,10,11);
		return node10;
	}
	
	private GxtComponentMetaNodeModel getWidthTextFieldGxtComponentMetaNodeModel() {
		//名称 
		Map<String, Object> TextFieldGxtComponent = new HashMap<String, Object>();
		TextFieldGxtComponent.put("component_model_type_index", ComponentTypeEnum.TEXTFIELD_MODEL.ordinal());
	
		HandlerData.data ( TextFieldGxtComponent , "cargoSpaceService" , "getAllCargoSpace" , "addCargoSpace" , "modifyCargoSpace" , "loadEditorableGrid" );
		
				TextFieldGxtComponent.put ( "id" , "cargoSpace.WIDTH" ); 
				TextFieldGxtComponent.put("width", "400");
				TextFieldGxtComponent.put("title", "bbbbbbbbbbbbbbb");
				TextFieldGxtComponent.put("fieldlabel", "货架宽度");
				TextFieldGxtComponent.put("name", "textField01");
				TextFieldGxtComponent.put("emptytext", "");
				TextFieldGxtComponent.put("allowblank", false);
			Map<String,Object> codes2 = new HashMap<String, Object>();
			//添加需要监听的事件类型，指定由某一个控制器响应，控制器内部应该如何响应（附加参数和数据）
			/**
			 * 00_01_02为特征码
			 * 或者是 控制器的唯一标识
			 */
				Map<String,Object> subMap = new HashMap<String, Object>();
					EventStructureMetaModel eventStructureMetaModel = new EventStructureMetaModel();
					eventStructureMetaModel.setControllerId("textFieldController01");
					eventStructureMetaModel.setResponseModeId("00_01_02");
				subMap.put("eventstructuremetamodel", eventStructureMetaModel);
			codes2.put("0301", subMap);
			//codes1.add("0002");
		//id.put("registereventtypes", codes2);
		GxtComponentMetaNodeModel node10  = new GxtComponentMetaNodeModel(TextFieldGxtComponent,10,11);
		return node10;
	}
	
	private GxtComponentMetaNodeModel getWeightTextFieldGxtComponentMetaNodeModel() {
	
		Map<String, Object> TextFieldGxtComponent = new HashMap<String, Object>();
		TextFieldGxtComponent.put("component_model_type_index", ComponentTypeEnum.TEXTFIELD_MODEL.ordinal());
	
		HandlerData.data ( TextFieldGxtComponent , "cargoSpaceService" , "getAllCargoSpace" , "addCargoSpace" , "modifyCargoSpace" , "loadEditorableGrid" );
		
				TextFieldGxtComponent.put ( "id" , "cargoSpace.MAXWEIGHT" ); 
				TextFieldGxtComponent.put("width", "400");
				TextFieldGxtComponent.put("title", "bbbbbbbbbbbbbbb");
				TextFieldGxtComponent.put("fieldlabel", "货架允许最大重量");
				TextFieldGxtComponent.put("name", "textField01");
				TextFieldGxtComponent.put("emptytext", "");
				TextFieldGxtComponent.put("allowblank", false);
			Map<String,Object> codes2 = new HashMap<String, Object>();
			//添加需要监听的事件类型，指定由某一个控制器响应，控制器内部应该如何响应（附加参数和数据）
			/**
			 * 00_01_02为特征码
			 * 或者是 控制器的唯一标识
			 */
				Map<String,Object> subMap = new HashMap<String, Object>();
					EventStructureMetaModel eventStructureMetaModel = new EventStructureMetaModel();
					eventStructureMetaModel.setControllerId("textFieldController01");
					eventStructureMetaModel.setResponseModeId("00_01_02");
				subMap.put("eventstructuremetamodel", eventStructureMetaModel);
			codes2.put("0301", subMap);
			//codes1.add("0002");
		//id.put("registereventtypes", codes2);
		GxtComponentMetaNodeModel node10  = new GxtComponentMetaNodeModel(TextFieldGxtComponent,10,11);
		return node10;
	}
	
	

	private GxtComponentMetaNodeModel getDepotComboBoxGxtComponentMetaNodeModel() {
		//仓库
		Map<String, Object> type = new HashMap<String, Object>();
		type.put("component_model_type_index", ComponentTypeEnum.COMBOBOX_MODEL.ordinal());
		type.put("fieldlabel", "所属仓库");
		type.put ( "id" , "cargoSpace.depot" ); 
		//type.put("dataload", "xxx");
		type.put("typeahead", true);
		type.put("emptytext", "===请选择===");
		type.put("loadingtext", "数据加载中,请稍等。。。。。。");
		type.put("allowblank", false);
		type.put("name", "comboBox");
		HandlerData.data ( type , "depotService" , "getAllDepot" );
		

		
		GxtComponentMetaNodeModel node11  = new GxtComponentMetaNodeModel(type,12,13);
		return node11;
	}


	private GxtComponentMetaNodeModel getCargoSpaceTypeComboBoxGxtComponentMetaNodeModel() {
		//仓库
		Map<String, Object> type = new HashMap<String, Object>();
		type.put("component_model_type_index", ComponentTypeEnum.COMBOBOX_MODEL.ordinal());
		type.put("fieldlabel", "货架类型");
		type.put ( "id" , "cargoSpace.cargoSpaceType" ); 
		//type.put("dataload", "xxx");
		type.put("typeahead", true);
		type.put("emptytext", "===请选择===");
		type.put("loadingtext", "数据加载中,请稍等。。。。。。");
		type.put("allowblank", false);
		type.put("name", "comboBox");
		HandlerData.data ( type , "cargoSpaceTypeService" , "getAllCargoSpaceType"  );
		

		
		GxtComponentMetaNodeModel node11  = new GxtComponentMetaNodeModel(type,12,13);
		return node11;
	}
	
	
	private GxtComponentMetaNodeModel getWidthUnitComboBoxGxtComponentMetaNodeModel() {
		
		Map<String, Object> type = new HashMap<String, Object>();
		type.put("component_model_type_index", ComponentTypeEnum.COMBOBOX_MODEL.ordinal());
		type.put("fieldlabel", "宽度单位");
		//type.put("dataload", "xxx");
		type.put("typeahead", true);
		type.put ( "id" , "cargoSpace.widthUnits" ); 
		type.put("emptytext", "===请选择===");
		type.put("loadingtext", "数据加载中,请稍等。。。。。。");
		type.put("allowblank", false);
		type.put("name", "comboBox");
		HandlerData.data ( type , "unitsService" , "getAllUnits"  );

		
		GxtComponentMetaNodeModel node11  = new GxtComponentMetaNodeModel(type,12,13);
		return node11;
	}
	private GxtComponentMetaNodeModel getWeightUnitComboBoxGxtComponentMetaNodeModel() {
		//仓库
		Map<String, Object> type = new HashMap<String, Object>();
		type.put("component_model_type_index", ComponentTypeEnum.COMBOBOX_MODEL.ordinal());
		type.put("fieldlabel", "重量单位");
		type.put ( "id" , "cargoSpace.maxWeightUnits" ); 
		//type.put("dataload", "xxx");
		type.put("typeahead", true);
		type.put("emptytext", "===请选择===");
		type.put("loadingtext", "数据加载中,请稍等。。。。。。");
		type.put("allowblank", false);
		type.put("name", "comboBox");
		HandlerData.data ( type , "unitsService" , "getAllUnits"  );


		
		GxtComponentMetaNodeModel node11  = new GxtComponentMetaNodeModel(type,12,13);
		return node11;
	}
	
	
	


	/**
	 * 模拟从后台传过来的关于Window控件的元模型信息
	 */
	private GxtComponentMetaNodeModel getDateFieldGxtComponentMetaNodeModel1() {
		//编号
		Map<String, Object> id = new HashMap<String, Object>();
		id.put("component_model_type_index", ComponentTypeEnum.DATEFIELD_MODEL.ordinal());
		//id.put("dataload", "xxx");
				/*GxtToSeamServiceParameter gxtToSeamServiceParameter = new GxtToSeamServiceParameter();
				gxtToSeamServiceParameter.setServiceComponentName("com.test.server.business.PersonService");
				gxtToSeamServiceParameter.setServiceMethodName("loadTextFieldData");
			//	gxtToSeamServiceParameter.setServiceMethodName("getList2");
			//	gxtToSeamServiceParameter.setServiceMethodName("getEnums");
				BaseModel[] methodArguments2 = new BaseModel[1];
				methodArguments2[0] = new BaseModel();
				gxtToSeamServiceParameter.setMethodArguments(methodArguments2 );*/
		HandlerData.data ( id , "cargoSpaceService" , "getAllCargoSpace" , "addCargoSpace" , "modifyCargoSpace" , "loadEditorableGrid" );
		
		id.put ( "id" , "cargoSpace.EFFECTIVEDATE" ); 
		id.put("width", "400");
		id.put("title", "bbbbbbbbbbbbbbb");
		id.put("fieldlabel", "生效日期");
		id.put("name", "dateField01");
		id.put("emptytext", "Rpc____emptytext");
		id.put("allowblank", false);
			Map<String,Object> codes2 = new HashMap<String, Object>();
			//添加需要监听的事件类型，指定由某一个控制器响应，控制器内部应该如何响应（附加参数和数据）
			/**
			 * 00_01_02为特征码
			 * 或者是 控制器的唯一标识
			 */
				Map<String,Object> subMap = new HashMap<String, Object>();
					EventStructureMetaModel eventStructureMetaModel = new EventStructureMetaModel();
					eventStructureMetaModel.setControllerId("textFieldController01");
					eventStructureMetaModel.setResponseModeId("00_01_02");
				subMap.put("eventstructuremetamodel", eventStructureMetaModel);
			codes2.put("0301", subMap);
			//codes1.add("0002");
		//id.put("registereventtypes", codes2);
		GxtComponentMetaNodeModel node10  = new GxtComponentMetaNodeModel(id,10,11);
		return node10;
		
	}


	/**
	 * 模拟从后台传过来的关于Window控件的元模型信息
	 */
	private GxtComponentMetaNodeModel getDateFieldGxtComponentMetaNodeModel2() {
		//编号
		Map<String, Object> id = new HashMap<String, Object>();
		id.put("component_model_type_index", ComponentTypeEnum.DATEFIELD_MODEL.ordinal());
		//id.put("dataload", "xxx");
				/*GxtToSeamServiceParameter gxtToSeamServiceParameter = new GxtToSeamServiceParameter();
				gxtToSeamServiceParameter.setServiceComponentName("com.test.server.business.PersonService");
				gxtToSeamServiceParameter.setServiceMethodName("loadTextFieldData");
			//	gxtToSeamServiceParameter.setServiceMethodName("getList2");
			//	gxtToSeamServiceParameter.setServiceMethodName("getEnums");
				BaseModel[] methodArguments2 = new BaseModel[1];
				methodArguments2[0] = new BaseModel();
				gxtToSeamServiceParameter.setMethodArguments(methodArguments2 );*/
		HandlerData.data ( id , "cargoSpaceService" , "getAllCargoSpace" , "addCargoSpace" , "modifyCargoSpace" , "loadEditorableGrid" );
		
		id.put("width", "400");
		id.put("title", "bbbbbbbbbbbbbbb");
		id.put ( "id" , "cargoSpace.INVALIDATIONDATE" ); 
		id.put("fieldlabel", "失效日期");
		id.put("name", "dateField01");
		id.put("emptytext", "Rpc____emptytext");
		id.put("allowblank", false);
			Map<String,Object> codes2 = new HashMap<String, Object>();
			//添加需要监听的事件类型，指定由某一个控制器响应，控制器内部应该如何响应（附加参数和数据）
			/**
			 * 00_01_02为特征码
			 * 或者是 控制器的唯一标识
			 */
				Map<String,Object> subMap = new HashMap<String, Object>();
					EventStructureMetaModel eventStructureMetaModel = new EventStructureMetaModel();
					eventStructureMetaModel.setControllerId("textFieldController01");
					eventStructureMetaModel.setResponseModeId("00_01_02");
				subMap.put("eventstructuremetamodel", eventStructureMetaModel);
			codes2.put("0301", subMap);
			//codes1.add("0002");
		//id.put("registereventtypes", codes2);
		GxtComponentMetaNodeModel node10  = new GxtComponentMetaNodeModel(id,10,11);
		return node10;
		
	}



	private GxtComponentMetaNodeModel getContentPanelGxtComponentMetaNodeModel1() {
		Map<String, Object> map2=new HashMap<String, Object>();
		//map2.put("component_model_type", ComponentTypeEnum.CONTENTPANEL_MODEL);
		map2.put("component_model_type_index", ComponentTypeEnum.CONTENTPANEL_MODEL.ordinal());
		map2.put("headervisible", false);	
		map2.put("layoutindex", ComponentTypeEnum.FORMLAYOUT_MODEL.ordinal());
		map2.put("id", "05_01_contentPanelGxtComponent_CargoSpace");	
		map2.put("title", "Rpc===dataload----AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER");	
		
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(map2);
		return node2;
	}
	private GxtComponentMetaNodeModel getContentPanelGxtComponentMetaNodeModel2() {
		Map<String, Object> map2=new HashMap<String, Object>();
		//map2.put("component_model_type", ComponentTypeEnum.CONTENTPANEL_MODEL);
		map2.put("component_model_type_index", ComponentTypeEnum.CONTENTPANEL_MODEL.ordinal());
		map2.put("headervisible", false);	
		
		map2.put("layoutindex", ComponentTypeEnum.FORMLAYOUT_MODEL.ordinal());
		map2.put("id", "05_02_contentPanelGxtComponent_CargoSpace");	
		map2.put("title", "Rpc===dataload----AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER");	
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(map2);
		return node2;
	}
	
	
	
	


	private GxtComponentMetaNodeModel getCheckBoxGxtComponentMetaNodeModel() {
	    
	    Map<String, Object> checkBox01 = new HashMap<String, Object>();
	    checkBox01.put("component_model_type_index", ComponentTypeEnum.CHECKBOX_MODEL.ordinal());
	    checkBox01.put("id", "cargoSpace.ISEFFECTIVE");
	    checkBox01.put("boxlabel", "是否有效");
	    checkBox01.put("name", "check1");
	    checkBox01.put("value", true);
		GxtComponentMetaNodeModel node11  = new GxtComponentMetaNodeModel(checkBox01);
	    
	  

		List<GxtComponentMetaNodeModel> list = new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node11);
		
		
		Map<String, Object> groups = new HashMap<String, Object>();
		groups.put("component_model_type_index", ComponentTypeEnum.CHECKBOXGROUP_MODEL.ordinal());
		groups.put("fieldlabel", "有效状态");
		groups.put("id", "6_1_cargoSpace.ISEFFECTIVE");
		
		groups.put("name", "checkGroup0000");
		groups.put("children", list);
		HandlerData.data ( groups , "cargoSpaceService" , "getAllCargoSpace" , "addCargoSpace" , "modifyCargoSpace" , "loadEditorableGrid" );
		
		GxtComponentMetaNodeModel node00  = new GxtComponentMetaNodeModel(groups);

		return node00;
	}

	
}
